package com.xmb.wechat.view.wechat.money;

import android.graphics.Color;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.blankj.utilcode.util.ActivityUtils;
import com.xmb.wechat.R;
import com.xmb.wechat.R2;
import com.xmb.wechat.base.BaseActivity;
import com.xmb.wechat.definterface.HintListener;
import com.xmb.wechat.entity.WechatAppInfoBean;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 微信：支付
 */
public class WechatFundChangeActivity extends BaseActivity {

    @BindView(R2.id.btn_qianbao)
    LinearLayout btnQianbao;
    @BindView(R2.id.tv_lingqian)
    TextView     tvLingqian;

    public WechatFundChangeActivity() {
        super(R.layout.activity_fund_change);
    }

    @Override
    protected void initView() {
        setStatusBarColor(Color.parseColor("#ededed"));
        setNavigationColor(Color.parseColor("#f7f7f7"));

        showExemption(new HintListener() {
            @Override
            public void onConfirm() {
                //do nothing
            }

            @Override
            public void onCancel() {
                WechatFundChangeActivity.this.finish();
            }
        });
    }

    @Override
    protected void onResume() {
        super.onResume();
        refresh();
    }

    private void refresh() {
        WechatAppInfoBean vo = WechatAppInfoBean.getWechat(this);
        tvLingqian.setText("¥" + vo.getLingqian());
    }

    @OnClick(R2.id.btn_qianbao)
    public void onViewClicked() {
        ActivityUtils.startActivity(WechatFundWalletActivity.class);
    }
}
